package org.mall.modules.shoptype.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.mall.modules.shoptype.entity.ShopTypeRe;
import org.mall.modules.shoptype.mapper.ShopTypeReMapper;
import org.mall.modules.shoptype.service.IShopTypeReService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/***
 *@author yinxucun
 *@date 2020-01-02 14:18 
 */
@Service
public class ShopTypeReServiceImpl extends ServiceImpl<ShopTypeReMapper, ShopTypeRe> implements IShopTypeReService {

    @Resource
    ShopTypeReMapper shopTypeReMapper;
    @Override
    public boolean removeByShopId(String id) {
        return shopTypeReMapper.removeByShopI(id);
    }

    @Override
    public List<ShopTypeRe> getGoodsTypeListByShopIds(List<String> shopIds) {
        if (shopIds.isEmpty()){
            return Collections.emptyList();
        }
        return shopTypeReMapper.getGoodsTypeListByShopIds(shopIds);
    }
}
